package com.yupi.usercenter.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.usercenter.common.TeamQuery;
import com.yupi.usercenter.model.domain.Team;
import com.yupi.usercenter.model.domain.User;
import com.yupi.usercenter.model.domain.request.TeamJoinRequest;
import com.yupi.usercenter.model.domain.request.TeamQuitRequest;
import com.yupi.usercenter.model.domain.request.TeamUpdateRequest;
import com.yupi.usercenter.model.domain.vo.TeamUserVO;

import java.util.List;

/**
* @author 13921
* @description 针对表【team(队伍表)】的数据库操作Service
* @createDate 2024-12-30 15:33:10
*/
public interface TeamService extends IService<Team> {
    /**
     * 添加队伍
     *
     * @param team
     * @param loginUser
     * @return
     */
    long addTeam(Team team, User loginUser);
    /**
     * 查询队伍
     *
     * @param
     * @param
     * @return
     */

    List<TeamUserVO> listTeams(TeamQuery teamQuery, boolean isAdmin);

    /**
     *更新队伍
     *
     * @param
     * @param
     * @return
     */
    boolean updateTeam(TeamUpdateRequest team, User loginUser);

    /**
     * 加入队伍
     *
     * @param
     * @param
     * @return
     */

    boolean joinTeam(TeamJoinRequest teamJoinRequest, User loginUser);
    /**
     * 用户提出队伍
     *
     * @param
     * @param
     * @return
     */

    boolean quitTeam(TeamQuitRequest teamQuitRequest, User loginUser);

    /**
     *  解散队伍
     *
     * @param
     * @param
     * @return
     */

    boolean deleteTeam(long id, User loginUser);
}
